package io.terminus.chain;

import io.terminus.manager.FlagManager;

/**
 * Created by Stay on 2017/6/24  11:44.
 */
public class FirstHandler extends Handler {
    /**
     * 判断特殊情况
     *
     * @param num
     */
    public void handle(Integer num) {
        //每次都初始化str
        init();
        if (FlagManager.getInstance().getFlagMap().get("spFlag")) {
            str = "Fizz";
        } else if (nextHandler != null) {
            getNextHandler().handle(num);
        }
    }
}
